openapi: 3.0.3
info:
  title: Users
  version: 1.0.0
  description: Users service
servers:
  - url: /api/v1
tags:
  - name: users
    description: Пользователи
  - name: userbooks
    description: Книги пользователя
paths:
  /users/users:
    $ref: './users/paths.yaml#/Users'
  /users/users/{id}:
    $ref: './users/paths.yaml#/UsersOne'
  /userbooks/userbooks:
    $ref: './userbooks/paths.yaml#/UserBooks'
  /userbooks/userbooks/{id}:
    $ref: './userbooks/paths.yaml#/UserBooksOne'
components:
  parameters:
    QueryInclude:
      $ref: './common_parameters.yaml#/QueryInclude'
    PathId:
      $ref: './common_parameters.yaml#/PathId'
  schemas:
    EmptyDataResponse:
      type: object
      properties:
        data:
          type: object
          nullable: true
        meta:
          type: object
      required:
          - data
    PaginationTypeEnum:
      $ref: './common_schemas.yaml#/PaginationTypeEnum'
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: './errors.yaml#/ErrorResponse'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: './errors.yaml#/ErrorResponse'
    ServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: './errors.yaml#/ErrorResponse'